final class VoluntaryThieve$Action$Steps
{
  private static final int PERFORM = 0;
  private static final int CONFIRM = 1;
  private static final int FINISH = 2;
  private final long[] maximumTimes;
  private final long[] startingTimes = new long[3];

  private int currentStep = 0;

  private VoluntaryThieve$Action$Steps(long[] paramArrayOfLong)
    throws IllegalArgumentException
  {
    if (paramArrayOfLong.length != 3) throw new IllegalArgumentException("Invalid argument length, expected 3 was " + paramArrayOfLong.length + ".");

    for (long l : paramArrayOfLong) {
      if (l >= 0L) continue; throw new IllegalArgumentException("Maximum time was below zero: " + l);
    }
    this.maximumTimes = paramArrayOfLong;
  }

  private int getCurrent()
  {
    return this.currentStep;
  }

  private void setStartingTime()
  {
    this.startingTimes[getCurrent()] = System.currentTimeMillis();
  }

  private long getStartingTime()
  {
    return this.startingTimes[getCurrent()];
  }

  private boolean isStartingTimeSet()
  {
    return getStartingTime() > 0L;
  }

  private void next()
    throws IllegalStateException
  {
    if (getCurrent() >= 2) {
      throw new IllegalStateException("Unable to switch step, current step is: " + getCurrent());
    }
    this.currentStep += 1;
  }

  private boolean isObsolete()
    throws IllegalStateException
  {
    if (!isStartingTimeSet()) throw new IllegalStateException("Starting time has not been set.");
    return System.currentTimeMillis() - getStartingTime() >= this.maximumTimes[getCurrent()];
  }
}